#ifndef DEFINE_BITS_LOSSLESS_H
#define DEFINE_BITS_LOSSLESS_H
#include "type.h"
namespace swfstream {
class DefineBitsLossless: public Defination {
public:
	//uint id(){return CharacterID;}
	//uint CharacterID;///< UI16 ID for this character
	uint BitmapFormat; ///< UI8 Format of compressed data 3 = 8-bit colormapped image 4 = 15-bit RGB image 5 = 24-bit RGB image
	uint BitmapWidth; ///< UI16 Width of bitmap image
	uint BitmapHeight; ///< UI16 Height of bitmap image
	uint BitmapColorTableSize; ///< If BitmapFormat = 3 UI8 Otherwise absent This value is one less than the actual number of colors in the color table, allowing for up to 256 colors.
	void* ZlibBitmapData; ///< If BitmapFormat = 3 COLORMAPDATA If BitmapFormat = 4 or 5 BITMAPDATA ZLIB compressed bitmap data
	static DefineBitsLossless* from_file(FILE* f, uint tag_length);
	void print();
	bool to_png(const char * fname);
};
}
#endif
